package cc.aiee.demo.springboot.controller.paypal.bean;

import cc.aiee.core.abstracts.AbstractQuickModel;
import cc.aiee.core.interfaces.PayJsonBeanInterface;
import cc.aiee.core.kit.KitJson;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@Schema(description = "支付接口")
@EqualsAndHashCode(callSuper = false)
public class PayPalCreateQuery extends AbstractQuickModel implements PayJsonBeanInterface{

	@Schema(description = "付款方式随机数", required = true)
	private String paymentMethodNonce;

	@Schema(description = "设备数据 ")
	private String deviceData;

	@Schema(description = "金额(分)", example = "1", required = true)
	private Integer amount;

	@Override
	public <T> T model(T cls) {
		BeanUtil.copyProperties(this, cls, true);
		return cls;
	}

	@Override
	public String toJson() {
		return KitJson.toJSONString(this);
	}

	@Override
	public String toJson(boolean prettyFormat, boolean ignoreNull) {
		return KitJson.toJSONString(this,prettyFormat,ignoreNull);
	}

}
